home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1996 May / cd joy 71No13.iso / pc / demos / eurosoc / source / euro_sel.cpp < prev    next >
C/C++ Source or Header  |  1996-03-19  |  18KB  |  600 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <conio.h>
  5. #include <math.h>
  6.  
  7. #include "eurodefs.h"
  8. #include "euro_fxd.h"
  9. #include "euro.equ"
  10. #include "euro_sym.h"
  11. #include "euro_def.h"
  12. #include "euro_var.h"
  13. #include "euro_grf.h"
  14. #include "euro_dsk.h"
  15. #include "euro_gen.h"
  16. #include "euro_grf.h"
  17. #include "euro_cnt.h"
  18. #include "euro_usr.h"
  19. #include "euro_net.h"
  20. #include "euro_int.h"
  21.  
  22. #include "defines.h"
  23. #include "intronet.h"
  24.  
  25.     extern        int   MouseFlags;
  26.  
  27.  
  28. void    DisplaySelectedTeam();
  29. char    HaveNETteamsBeenChosen();
  30.  
  31.  
  32.  
  33.  
  34. //********************************************************************************************************************************
  35.  
  36. void    SetupTeamSelectButtons( char GAMEtype )
  37.     {
  38.         if ( GAMEtype == EURO_friendly )
  39.         {        
  40.             PlayerSetupHandle     =  AddAnimation( 446, 180, 
  41.                          ( (float)BUTN_WHBL ), ( (float)BUTN_WHBL+11.9 ),
  42.                          0.0, PLAYER_SETUP_BOX, CONT_ANIM );
  43.             PlyrSetupHighlight     =  ControlOptionHighlight( -1, PLAYER_SETUP_BOX,
  44.                            PLAYER_SETUPdisp_BOX, -1, 
  45.                            PlayerSetupHandle, BUTN_LBLS+PlayerSetup );
  46.  
  47.  
  48.             TeamSetupHandle     =  AddAnimation( 446, 228, 
  49.                          ( (float)BUTN_WHBL ), ( (float)BUTN_WHBL+11.9 ),
  50.                          0.0, FORMATION_SETUP_BOX, CONT_ANIM );
  51.             TeamSetupHighlight     =  ControlOptionHighlight( -1, FORMATION_SETUP_BOX,
  52.                            FORMATION_SETUPdisp_BOX, -1, 
  53.                            TeamSetupHandle, BUTN_LBLS+TeamSetup );
  54.  
  55.             StartMatchHandle     =  AddAnimation( 446, 300, 
  56.                          ( (float)BUTN_WHBL ), ( (float)BUTN_WHBL+11.9 ),
  57.                          0.0, START_MATCH_BOX, CONT_ANIM );
  58.             StartMatchHighlight     =  ControlOptionHighlight( -1, START_MATCH_BOX,
  59.                            START_MATCHdisp_BOX, -1, 
  60.                            StartMatchHandle, BUTN_LBLS+StartMatch );
  61.  
  62.         }
  63.  
  64.         if ( GAMEtype == EURO_network_game )
  65.         {        
  66.             SelectTeamsHandle     =  AddAnimation( 446, 300, 
  67.                          ( (float)BUTN_WHBL ), ( (float)BUTN_WHBL+11.9 ),
  68.                          0.0, SELECT_TEAM_BOX, CONT_ANIM );
  69.             SelectTeamsHighlight     =  ControlOptionHighlight( -1, SELECT_TEAM_BOX,
  70.                            SELECT_TEAMdisp_BOX, -1, 
  71.                            SelectTeamsHandle, BUTN_LBLS+SelectTeams );
  72.         }
  73.  
  74.         if ( GAMEtype == EURO_championship )
  75.         {        
  76.             UserSelectTeamHandle     =  AddAnimation( 446, 350, 
  77.                          ( (float)BUTN_WHBL ), ( (float)BUTN_WHBL+11.9 ),
  78.                          0.0, USER_TEAM_SELECT_BOX, CONT_ANIM );
  79.             SelectHighlight        =  ControlOptionHighlight( -1, USER_TEAM_SELECT_BOX,
  80.                            USER_TEAMdisp_BOX, -1,
  81.                             UserSelectTeamHandle, BUTN_LBLS+Select );
  82.                                 
  83.             if ( EUROuserSelection == 0 )
  84.             {
  85.                 NoOfUsersHandle     =  AddAnimation( 446, 300, 
  86.                              ( (float)BUTN_WHBL ), ( (float)BUTN_WHBL+11.9 ),
  87.                              0.0, NOofUSERS_BOX, RUN_ONCE );
  88.                 UserHighlight        = ControlOptionHighlight( -1, NOofUSERS_BOX,
  89.                               NOofUSERSdsp_BOX, -1,
  90.                               NoOfUsersHandle, USRS_LBLS+(EUROnoOfMatchPlyrs-1) );
  91.             }
  92.         }
  93.  
  94.  
  95.  
  96.  
  97.     }
  98.         
  99. //********************************************************************************************************************************
  100.  
  101. void    DisplaySelectedTeam()
  102.     {
  103.         CopyFromBACKtoPSEUDObuffer( &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  104.                     52, 406, 366, 30 );
  105.  
  106.         if ( EUROgameType != EURO_championship )
  107.         {
  108.  
  109.             DisplayString( 
  110.                 132-(PixelLengthOfString(GetTEAMname( EUROteamA, 11 ), LARGE_FONT)/2),
  111.                 406,
  112.                 GetTEAMname( EUROteamA, 11 ),
  113.                 LARGE_FONT, 
  114.                 43,
  115.                 EURO_TEAMa_BOX,
  116.                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  117.  
  118.             DisplayString( 
  119.                 340-(PixelLengthOfString(GetTEAMname( EUROteamB, 11 ), LARGE_FONT)/2),
  120.                 406,
  121.                 GetTEAMname( EUROteamB, 11 ),
  122.                 LARGE_FONT, 
  123.                 50,
  124.                 EURO_TEAMb_BOX,
  125.                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  126.         }
  127.  
  128.         else
  129.         
  130.  
  131.             DisplayString( 
  132.                 237-(PixelLengthOfString(GetTEAMname( EUROteamA, 11 ), LARGE_FONT)/2),
  133.                 406,
  134.                 GetTEAMname( EUROteamA, 11 ),
  135.                 LARGE_FONT, 
  136.                 43,
  137.                 EURO_TEAMa_BOX,
  138.                 &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  139.  
  140.         AddToDumpList( 52, 406, 366, 30 );
  141.     }
  142.  
  143. //********************************************************************************************************************************
  144.  
  145. signed    int    LegaliseEuro96UserSelection( int AimAddn, signed int SelectionAim )
  146.     {
  147.         char    a = 0;
  148.         char    c;
  149.         signed  int aim    = AimAddn;
  150.         
  151.          while    ( a == 0 )
  152.         {
  153.             c = CountryTBL[((SelectionAim+AimAddn)&15)];
  154.  
  155.             if ( EURO96setup[c].NoOfUsers < 2 )
  156.                 a = 1;
  157.             else
  158.                 AimAddn+= aim;
  159.         }
  160.         return(AimAddn);
  161.     }
  162.  
  163. //********************************************************************************************************************************
  164.  
  165. void    GetFirstLegalEuro96Team()
  166.     {
  167.         if ( EUROgameType == EURO_championship )
  168.         {
  169.             if ( EUROuserSelection == 0 )
  170.             {
  171.                 for ( char s=0; s < 16; s++ )
  172.                 {
  173.                      EURO96setup[s].NoOfUsers = 0;
  174.                 }
  175.             }
  176.  
  177.             for ( char i = 0; i < 16; i++ )
  178.                {
  179.                 if ( EURO96setup[i].NoOfUsers < 2 )
  180.                     break;                
  181.             }
  182.             
  183.             EUROteamA      = i;
  184.                    SelectionCounter = AimTBL[EUROteamA];
  185.             memcpy( &PaletteBuffer[44*3], &SparePaletteBuffer[ (LeagueColourOffsets[EUROteamA]*3)+3 ], 7*3 );
  186.         }
  187.     }
  188.  
  189. //********************************************************************************************************************************
  190.  
  191. void    UpdateSelectionPalettes()
  192.     {
  193.         fixed    *a;
  194.         fixed    red, green, blue;
  195.         BYTE           *DestPalette;    
  196.  
  197.         a        = &CurrentPalette[44*3];
  198.          DestPalette    = &PaletteBuffer[44*3];
  199.  
  200.         memcpy( &PaletteBuffer[44*3], &SparePaletteBuffer[ (LeagueColourOffsets[EUROteamA]*3)+3 ], 7*3 );
  201.         memcpy( &PaletteBuffer[51*3], &SparePaletteBuffer[ (LeagueColourOffsets[EUROteamB]*3)+3 ], 7*3 );
  202.  
  203.         for ( short c = 44; c < 58; c++ )
  204.            {
  205.                red        =    (*(DestPalette++));        
  206.                green        =    (*(DestPalette++));        
  207.                blue        =    (*(DestPalette++));        
  208.                (*(a++))    =    red;
  209.                (*(a++))    =    green;
  210.                (*(a++))    =    blue;
  211.             outp    ( 0x3c8, c );
  212.             outp    ( 0x3c9, (char)red);
  213.             outp    ( 0x3c9, (char)green);
  214.             outp    ( 0x3c9, (char)blue);
  215.         }
  216.     }
  217.  
  218. //********************************************************************************************************************************
  219.  
  220. void    DisplayLowerSelectionPanel( char GAMEtype )
  221.     {
  222.         if ( GAMEtype != EURO_championship )
  223.         {
  224.             DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  225.                 GERL_SBAR, 28, 394, NO_BOX, spritecopy );      
  226.                 
  227.             VersusLength    =    PixelLengthOfString(GetTEXT( VRUS_LBLE ), LARGE_FONT);
  228.             DisplayString( 237 - (VersusLength/2),
  229.                 406,
  230.                      GetTEXT( VRUS_LBLE ),
  231.                 LARGE_FONT, 22, NO_BOX, 
  232.                 &FrontendBackgroundDEFN, &FrontendTextureDEFN  );
  233.         }
  234.  
  235.  
  236.         else
  237.  
  238.         {
  239.             DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  240.                 EURO_SELC+Lft, 237-Image_Widths[EURO_SELC+Lft], 
  241.                 394, NO_BOX, spritecopy );      
  242.             DrawIMAGE( &FrontendBackgroundDEFN, &FrontendTextureDEFN, 
  243.                 EURO_SELC+Rgt, 237, 394, NO_BOX, spritecopy );      
  244.         }
  245.     }
  246.  
  247. //********************************************************************************************************************************
  248.  
  249. void    DisplayGameType( char gametype )
  250.     {
  251.         if ( EUROgameType == EURO_championship )
  252.             DisplayString( 12, 98,
  253.                 GetTEXT ( PICK_LBLS+EUROuserSelection ),
  254.                 LARGE_FONT, 36, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  255.         else
  256.             DisplayString( 12, 98,
  257.                 GetTEXT (MTCH_LBLS+gametype),
  258.                 LARGE_FONT, 36, NO_BOX, &FrontendPseudoDEFN, &FrontendTextureDEFN  );
  259.     }
  260.  
  261. //********************************************************************************************************************************
  262.  
  263. void    CalculateDir( int SelectionCounter, int SelectionAim)
  264.     {
  265.         SelectDir    =    1;
  266.  
  267.         for ( int i=0; i < 8; i++ )
  268.         {
  269.             if ( ((int)SelectionCounter&60) == ( ((SelectionAim+i)&15)*4) )
  270.                 SelectDir    =    -1;
  271.         }
  272.     }
  273.  
  274. //********************************************************************************************************************************
  275.  
  276. void    DoTeamSelection( char MENU, signed char BOX )
  277.     {
  278.  
  279.     signed int     SelectionCompare;
  280.  
  281. //        if ( MENU == TEAM_SELECT && ChangeMenu == -1 &&
  282. //             EUROgameType == EURO_network_game && 
  283. //             HaveNETteamsBeenChosen() == Yes )
  284.  
  285.  
  286.         if ( MENU == TEAM_SELECT && LogicState == RUN_FRONTEND && //ChangeMenu == -1 
  287.              EUROgameType == EURO_network_game && 
  288.              HaveNETteamsBeenChosen() == Yes )
  289.             ChangeMenu    =    PLAYER_SETUP;
  290.  
  291.         else
  292.  
  293.         if ( MENU == TEAM_SELECT && LogicState == RUN_FRONTEND )
  294.         {
  295.             if ( EUROgameType == EURO_friendly )
  296.             {        
  297.                 StartMatchHighlight     =  ControlOptionHighlight( BOX, START_MATCH_BOX,
  298.                                START_MATCHdisp_BOX, StartMatchHighlight, 
  299.                                StartMatchHandle, BUTN_LBLS+StartMatch );
  300.  
  301.                 TeamSetupHighlight     =  ControlOptionHighlight( BOX, FORMATION_SETUP_BOX,
  302.                                FORMATION_SETUPdisp_BOX, TeamSetupHighlight, 
  303.                                TeamSetupHandle, BUTN_LBLS+TeamSetup );
  304.  
  305.                 PlyrSetupHighlight     =  ControlOptionHighlight( BOX, PLAYER_SETUP_BOX,
  306.                                PLAYER_SETUPdisp_BOX, PlyrSetupHighlight, 
  307.                                PlayerSetupHandle, BUTN_LBLS+PlayerSetup );
  308.  
  309.             }
  310.  
  311.             if ( EUROgameType == EURO_championship )
  312.             {        
  313.                 SelectHighlight    = ControlOptionHighlight( BOX, USER_TEAM_SELECT_BOX,
  314.                           USER_TEAMdisp_BOX, SelectHighlight, 
  315.                           UserSelectTeamHandle, BUTN_LBLS+Select );
  316.                 UserHighlight    = ControlOptionHighlight( BOX, NOofUSERS_BOX,
  317.                           NOofUSERSdsp_BOX, UserHighlight, 
  318.                           NoOfUsersHandle, USRS_LBLS+(EUROnoOfMatchPlyrs-1) );
  319.             }
  320.  
  321.             
  322.             if ( EUROgameType == EURO_network_game )
  323.             {        
  324.  
  325.                 SelectTeamsHighlight     =  ControlOptionHighlight( BOX, SELECT_TEAM_BOX,
  326.                                SELECT_TEAMdisp_BOX, SelectTeamsHighlight, 
  327.                                SelectTeamsHandle, BUTN_LBLS+SelectTeams );
  328.  
  329.             }
  330.  
  331.  
  332.     //-----------------------------------------------------------------------------------------------
  333.  
  334.         if ( BOX == START_MATCH_BOX && ButtonState != 0 )
  335.           {
  336.             Animation_table[StartMatchHandle].AnimationSpeed = 
  337.                     WhichButton( ButtonState, 0.85);
  338.             RunMatch     =    Yes;
  339.             ChangeMenu    =    MAIN;
  340.                  DeBounce      =     TRUE;
  341.           }                                     
  342.     
  343.         //…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª 
  344.         //∫                                         ∫
  345.         //∫ Ready to start Championship competition ∫
  346.         //∫                                         ∫
  347.         //»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº 
  348.  
  349.         if ( BOX == USER_TEAM_SELECT_BOX && ButtonState != 0 && EUROuserSelection == (EUROnoOfMatchPlyrs-1) )
  350.           {
  351.             UserList[EUROuserSelection].team = EUROteamA;
  352.             Animation_table[StartEuro96Handle].AnimationSpeed = 
  353.                     WhichButton( ButtonState, 0.85);
  354.             SelectHighlight =     -1;
  355.  
  356.             ChangeMenu    =    GROUP_FIXTURES;
  357.  
  358.                  DeBounce      =     TRUE;
  359.           }                                     
  360.  
  361.     //-----------------------------------------------------------------------------------------------
  362.  
  363.             {
  364.                 TranslateUserSelections();        
  365.         
  366.                 if ( (int)SelectionCounter != (SelectionAim *4) )
  367.                     {
  368.                         if ( SelectDir == 1 )
  369.                             SelectionCounter+=    SelectionSpeed;
  370.                         if ( SelectDir == -1 )
  371.                             SelectionCounter-=    SelectionSpeed;
  372.     
  373.                         if ( SelectionSpeed < 1.0 && SelectionSpeed > 0 )
  374.                              SelectionSpeed*=    2;
  375.                         if ( SelectionSpeed > 1.0 )
  376.                              SelectionSpeed =    1.0;
  377.                     }
  378.     
  379.                 else
  380.                     {
  381.                         if ( ClickBOX == EURO_TEAMa_BOX )
  382.                             EUROteamA    =    CountryTBL[SelectionAim];
  383.                         if ( ClickBOX == EURO_TEAMb_BOX )
  384.                             EUROteamB    =    CountryTBL[SelectionAim];
  385.                         SelectionCounter=    SelectionAim*4;
  386.                         SelectionSpeed    =    0;
  387.                     }
  388.     
  389.                 SelectionCounter = fmod( SelectionCounter+64, 64);                
  390.     
  391.                 if ( SelectionSpeed == 0 && ( BOX == EURO_TEAMa_BOX || BOX == EURO_TEAMb_BOX ) )
  392.                 {
  393.                     if ( ButtonState != 0 )
  394.                     {
  395.                         ClickBOX    =    BOX;
  396.                         
  397.                         if ( BOX == EURO_TEAMa_BOX )
  398.                         {
  399.                             SelectionAim    =    AimTBL[EUROteamA];
  400.                             SelectionCompare=    AimTBL[EUROteamB];
  401.                         }
  402.                         else
  403.                         {
  404.                             SelectionAim    =    AimTBL[EUROteamB];
  405.                             SelectionCompare=    AimTBL[EUROteamA];
  406.                         }
  407.                         
  408.                         int    AimAddn;
  409.         
  410.                         AimAddn = ((int)WhichButton( ButtonState, 1.0 ));
  411.                         
  412.                         if ( EUROgameType != EURO_championship )
  413.                         {                        
  414.                             if ( ((SelectionAim+AimAddn)&15) == SelectionCompare )
  415.                                 AimAddn*=    2;
  416.                         }
  417.  
  418.                         else
  419.                             AimAddn = LegaliseEuro96UserSelection( AimAddn, SelectionAim );
  420.                         
  421.                         SelectionAim+=    AimAddn;
  422.                                         
  423.                          SelectionSpeed    =    .2;
  424.                         SelectionAim&=        15;
  425.                         CalculateDir(SelectionCounter,SelectionAim);
  426.                              DeBounce      =     TRUE;
  427.                     }
  428.                 }
  429.     
  430.  
  431.  
  432.                     //…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª 
  433.                     //∫                                                     ∫
  434.                     //∫ User Selects team for Euro Championship competition ∫
  435.                     //∫                                                     ∫
  436.                     //»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº 
  437.  
  438.                 if ( BOX == USER_TEAM_SELECT_BOX && ButtonState != 0 && EUROuserSelection != (EUROnoOfMatchPlyrs-1) )
  439.                   {
  440.                     Animation_table[UserSelectTeamHandle].AnimationSpeed = 
  441.                             WhichButton( ButtonState, 0.85);
  442.                     UserList[EUROuserSelection].team = EUROteamA;
  443.                      EURO96setup[EUROteamA].NoOfUsers++;
  444.                     EUROuserSelection++;
  445.                     SelectHighlight =     -1;
  446.                     ChangeMenu    =    TEAM_SELECT;
  447.                          DeBounce      =     TRUE;
  448.                   }                                     
  449.  
  450.                     //…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª 
  451.                     //∫                                  ∫
  452.                     //∫ User wishes to add an extra user ∫
  453.                     //∫                                  ∫
  454.                     //»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº 
  455.     
  456.                 if ( BOX == NOofUSERS_BOX && ButtonState != 0 )
  457.                   {
  458.                     if ( ButtonState==LEFT_BUTTON && EUROnoOfMatchPlyrs > 1 )
  459.                     {
  460.                         UserHighlight     =    -1;
  461.                         EUROnoOfMatchPlyrs--;
  462.                         Animation_table[NoOfUsersHandle].AnimationSpeed = -0.85;
  463.                              DeBounce      =     TRUE;
  464.                     }                    
  465.  
  466.                     char    users    = CalculateMaxPlayers();
  467.                         
  468.                     if ( ButtonState==RIGHT_BUTTON && EUROnoOfMatchPlyrs < 16 &&
  469.                          (users > EUROnoOfMatchPlyrs || users >= 4 )
  470.                         )
  471.                     {
  472.                         UserHighlight     =    -1;
  473.                         EUROnoOfMatchPlyrs++;
  474.                         Animation_table[NoOfUsersHandle].AnimationSpeed = 0.85;
  475.                              DeBounce      =     TRUE;
  476.                     }                    
  477.                         
  478.                   }                                     
  479.     
  480.     
  481.                 if ( BOX == PLAYER_SETUP_BOX && ButtonState != 0 )
  482.                   {
  483.                     Animation_table[PlayerSetupHandle].AnimationSpeed = 
  484.                             WhichButton( ButtonState, 0.85);
  485.                     ChangeMenu    =    PLAYER_SETUP;
  486.                          DeBounce      =     TRUE;
  487.                   }                                     
  488.     
  489.                     //…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª 
  490.                     //∫                                                  ∫
  491.                     //∫ User wishes to change to squad selection options ∫
  492.                     //∫                                                  ∫
  493.                     //»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº 
  494.  
  495.                 if ( BOX == FORMATION_SETUP_BOX && ButtonState != 0 )
  496.                   {
  497.                     Team =    ConfigureTeamView();
  498.                     Animation_table[TeamSetupHandle].AnimationSpeed = 
  499.                             WhichButton( ButtonState, 0.85);
  500.                            ChangeMenu    =    SQUAD_SELECT;
  501.                          DeBounce      =     TRUE;
  502.                   }                                     
  503.  
  504.                 
  505.                 if ( EUROgameType == EURO_network_game && 
  506.                    ( ( BOX == SELECT_TEAM_BOX && ButtonState != 0 ) || 
  507.                    ( Team_A!=-1 && Team_B!=-1)) )
  508.                   {
  509.                     Animation_table[PlayerSetupHandle].AnimationSpeed = 
  510.                             WhichButton( ButtonState, 0.85);
  511.                     ChangeMenu    =     PLAYER_SETUP;
  512.  
  513.                     if ( Team_A != -1 && Team_B != -1 )
  514.                         EURO_Did_I_ChooseTeams    =  No;         // other user made team choice.
  515.                     else 
  516.                     {
  517.                         EURO_Did_I_ChooseTeams    =  Yes;     // you made team choice.
  518.                         Team_A            =  EUROteamA;   // Send your choice of teams.
  519.                         Team_B            =  EUROteamB;     // Send your choice of teams.
  520.                          SendTeamInfo();
  521.                         TickPause();
  522.                         TickPause();
  523.                         TickPause();
  524.                              DeBounce          =  TRUE;
  525.                     }
  526.  
  527.                     EURO_NetSelectionMade    =  No;        // player selection has not yet been made.
  528.                   }                                     
  529.  
  530.                    DisplayCountrySelectImages();
  531.                 DisplaySelectedTeam();
  532.                 UpdateSelectionPalettes();
  533.                 }
  534.  
  535.     //-----------------------------------------------------------------------------------------------
  536.  
  537.         }
  538.  
  539.     }
  540. //********************************************************************************************************************************
  541.  
  542.  
  543. void    DisplayCountrySelectImages()
  544.     {
  545.         int width, height;
  546.  
  547.         if ( SelectionFlag != -1 )
  548.             CopyFromBACKtoPSEUDObuffer( &FrontendPseudoDEFN, &FrontendBackgroundDEFN,
  549.                         40, 219, 382, 102 );
  550.  
  551.         short    Outline    =    (short)SelectionCounter/4;
  552.         short    index    =    (short)SelectionCounter*8;
  553.     
  554.         for ( int i=0; i < 8; i++ )
  555.         {
  556.             if ( CountryImageDEFN[ ( index+i) ].image_no != -1 )
  557.  
  558.                 DrawIMAGE( &FrontendPseudoDEFN, &FrontendTextureDEFN, 
  559.                     CountryImageDEFN[ (index+i) ].image_no+TSEL_IMGS,
  560.                     CountryImageDEFN[ (index+i) ].xposn,
  561.                     CountryImageDEFN[ (index+i) ].yposn+26,
  562.                     NO_BOX, spritecopy );  
  563.         }
  564.  
  565.             if ( SelectionSpeed == 0 )
  566.             {
  567.                 ftable    =    FilterBuffer+(SelectFilterTBL[ (char)SelectFrame&31 ]);
  568.                 DrawIMAGE( &FrontendPseudoDEFN, &FrontendTextureDEFN, 
  569.                     CNTY_OUTS+Outline,
  570.                     CountryOutlinePosnDEFN[Outline].xposn,
  571.                     CountryOutlinePosnDEFN[Outline].yposn,
  572.                     NO_BOX, spritefilter );  
  573.             }
  574.     
  575.           SelectionFlag    =    0;
  576.         AddToDumpList( 40, 219, 382, 102 );
  577.     }
  578.  
  579. //********************************************************************************************************************************
  580.  
  581. char    HaveNETteamsBeenChosen()
  582.     {
  583.         char TeamsChosen = No;
  584.  
  585.         if ( Team_A!=-1 && Team_B!=-1 )        // If neither Team_A and Team_B are -1 (initial setting), then
  586.                             // another net-user has chosen teams and pressed continue button.
  587.         {
  588.             EURO_Did_I_ChooseTeams        =    NO;        // another user chose teams.
  589.             EUROteamA            =    Team_A;        // Setup other users choice of teams.
  590.             EUROteamB            =    Team_B;        // Setup other users choice of teams.
  591.             TickPause();
  592.             TeamsChosen = Yes;
  593.         }
  594.         return(TeamsChosen);
  595.     }
  596.  
  597. //***********************************************************************************************************
  598.  
  599.  
  600.